﻿using ConnectX;
using project.B12.Model.Enums;
using project.B12.Model.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace project.B12.IService
{
    public interface IServiceDevice
    {
        public ObservableCollection<Table_MonitorMes> Items64 { get; set; }

        /// <summary>
        /// 当前培育仓架
        /// </summary>
        int CurrentShelfIndex {  get; set; }

        /// <summary>
        /// 是否间隔拍照
        /// </summary>
        bool IsPhotoInterval {  get; set; }

        bool isConnect { get; set; }

        /// <summary>
        /// 是否是特殊加样
        /// </summary>
        bool IsSpecialSample {  get; set; }

        /// <summary>
        /// 是否开启测试（其他设置中简易测试功能）
        /// </summary>
        bool IsOpenTest { get; set; }

        /// <summary>
        /// 初始化是否结束
        /// </summary>
        bool IsInitEnd { get; set; }

        /// <summary>
        /// 转盘按钮是否可用
        /// </summary>
        bool IsTurntableEnabled { get; set; }

        /// <summary>
        /// 是否需要更新分析中的WellPlate条目信息
        /// </summary>
        bool IsUpdateWellPlateIDList {  get; set; }

        /// <summary>
        /// 是否开启消毒
        /// </summary>
        bool Disinfection {  get; set; }

        /// <summary>
        /// 当前培育仓门状态
        /// </summary>
        string CurrentDoorState {  get; set; }

        /// <summary>
        /// 连接状态
        /// </summary>
        string ConnectStatus {  get; set; }

        DeviceState deviceState { get;set; }

        string Temperature {  get; set; }

        /// <summary>
        /// 是否注销用户
        /// </summary>
        bool IsLogOut { get; set; }

        public bool isDestOnline { get; set; }

        public bool isBootloaderOnline { get; set; }

        void SampleSpecialFirst(Table_MonitorMes monitorMes);

        /// <summary>
        /// 特殊加样
        /// </summary>
        /// <param name="lorR">加样位</param>
        /// <param name="samples">需要加样的点位</param>
        /// <param name="volumeCount">加样体积</param>
        void SampleSpecial(int lorR, List<int> samples,int volumeCount, Table_MonitorMes monitorMes);

        void FinishSampleSpacial(Table_MonitorMes monitorMes);
        /// <summary>
        /// 初始化架子
        /// </summary>
        void InitItems64();

        /// <summary>
        /// 转动架子
        /// </summary>
        void TurnShelf(int shelfIndex);

        /// <summary>
        /// 开始消毒
        /// </summary>
        /// <param name="time"></param>
        void StartDisinfection(int time);

        /// <summary>
        /// 停止消毒
        /// </summary>
        bool StopDisinfection();
        void Refresh();

        /// <summary>
        /// 添加不需要扫描的培育仓位置和板子位置
        /// </summary>
        /// <param name="shelfIndex"></param>
        /// <param name="platIndex"></param>
        void AddNoNeedScan(int shelfIndex, int platIndex);

        /// <summary>
        /// 中止操作，加样时中止盖盖放回，其余等完成后中止
        /// </summary>
        void DiscontinueDevice();

        /// <summary>
        /// 修改孵育室温度
        /// </summary>
        /// <param name="temp"></param>
        void UpdateTemp(float temp);

        void Start();

        bool Connect();
    }
}
